﻿
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
	未命名頁面
</title><link rel="stylesheet" href="Style/parts.css" type="text/css" /><link rel="stylesheet" href="Style/jquery.autocomplete.css" type="text/css" />
</head>
<body>
    <form name="aspnetForm" method="post" action="default2.aspx" id="aspnetForm">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTg0MzY0MTM0MWRkAjdYDeWZEklokn/oDZyGKRT2+JY=" />
</div>


<script src="Script/jquery-1.4.2.min.js" type="text/javascript"></script>

<script src="Script/jquery-ui-1.8.custom.min.js" type="text/javascript"></script>
<script src="Script/jquery.autocomplete.js" type="text/javascript"></script>
<script type="text/javascript">
    //<![CDATA[
$(function() {
          $("#ctl00_ContentPlaceHolder1_ucCARac_txtID").autocomplete("QMG2.ASPX",
            {
                delay: 10,
                width: 250,
                minChars: 1, //至少輸入幾個字元才開始給提示?
                matchSubset: false,
                matchContains: false,
                cacheLength: 0,
                noCache: true, //黑暗版自訂參數，每次都重新連後端查詢(適用總資料筆數很多時)
                onItemSelect: findValue,
                onFindValue: findValue,
                formatItem: function(row) {
                    return "<div style='height:12px'><div style='float:left'>" + row[0] +
                            "</div>" +
                            "<div style='float:right;padding-right:5px;'>" +
                            row[1] + "</div>";
                },
                extraParams: { t: 'qmg2' }, 

                autoFill: false,
                mustMatch: true //是否允許輸入提示清單上沒有的值?
            });
              function findValue(li) {
                  if (li == null) return alert("No match!");
                  $("#ctl00_ContentPlaceHolder1_ucCARac_txtID").val(li.selectValue);
                  $("#ctl00_ContentPlaceHolder1_ucCARac_txtName").val(li.extra[0]);              
              }
          });		  
//]]>
</script>

<div>

	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBQLVt7BPAuG8lbgKApTr1egEAsKR+bAFAuTwoKwEfpMQutpApcGOnSl8YmwvSj+NDlU=" />
</div>
    <div id="wrap">
        <div style="height:5px"></div>
        
 <div class="criteriaDIV">

        
<div class="autoComplete">
    <fieldset>
        <legend><label>車型名稱:</label></legend>
        <input name="ctl00$ContentPlaceHolder1$ucCARac$txtID" type="text" id="ctl00_ContentPlaceHolder1_ucCARac_txtID" class="autoCompleteID" />
        <input name="ctl00$ContentPlaceHolder1$ucCARac$txtName" type="text" readonly="readonly" id="ctl00_ContentPlaceHolder1_ucCARac_txtName" class="autoCompleteName" />
    </fieldset>
</div>
        
<div class="autoComplete">
    <fieldset>

        <legend><label>產品名稱:</label></legend>
        <input name="ctl00$ContentPlaceHolder1$ucPRODUCTac$txtID" type="text" id="ctl00_ContentPlaceHolder1_ucPRODUCTac_txtID" class="autoCompleteID" />
        <input name="ctl00$ContentPlaceHolder1$ucPRODUCTac$txtName" type="text" readonly="readonly" id="ctl00_ContentPlaceHolder1_ucPRODUCTac_txtName" class="autoCompleteName" />
    </fieldset>
</div>
        
 </div>

    </div>
    </form>

</body>
</html>
